//
//  TrailReportsViewController.m
//  Love trial1。0
//
//  Created by giantumbrella on 15/5/29.
//  Copyright (c) 2015年 赵娟. All rights reserved.
//

#import "TrailReportsViewController.h"
#import "CommonMacro.h"
//#import "ShareViewController.h"
#import "PublishReportViewController.h"
@interface TrailReportsViewController ()

@end

@implementation TrailReportsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"免费试用";
    
    //右侧按钮
    UIBarButtonItem *rightButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"分享" style:UIBarButtonItemStylePlain target:self action:@selector(shareView)];
    self.navigationItem.rightBarButtonItem = rightButtonItem;

    [self createView];
}

#pragma mark 创建视图
- (void)createView
{
#warning 这里是创建滚动视图
    //1.创建滚动视图
    UIImageView *scrollImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH,120)];
    scrollImageView.backgroundColor = [UIColor greenColor];
    [self.view addSubview:scrollImageView];
    
    //2.产品介绍视图
    UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 180, SCREEN_WIDTH, 180)];
    bgView.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:bgView];
    
    //3.参与方式
    UILabel *partInLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 360, SCREEN_WIDTH, 150)];
    partInLabel.backgroundColor = [UIColor greenColor];
    [self.view addSubview:partInLabel];
    
    //4.提交报告按钮
    UIButton *submitReportButton = [[UIButton alloc] initWithFrame:CGRectMake(10, SCREEN_HEIGHT-50, SCREEN_WIDTH-20, 40)];
    submitReportButton.backgroundColor = [UIColor cyanColor];
    [submitReportButton setTitle:@"提交试用报告" forState:UIControlStateNormal];
    [submitReportButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self.view addSubview:submitReportButton];
    [submitReportButton addTarget:self action:@selector(finishReportDone) forControlEvents:UIControlEventTouchUpInside];
}

#pragma mark 提教试用报告 如果成功会出现下面的页面
- (void)finishReportDone
{
    PublishReportViewController *publishReportView = [PublishReportViewController new];
    UINavigationController *naviPublishReport = [[UINavigationController alloc] initWithRootViewController:publishReportView];
    [self.navigationController presentViewController:naviPublishReport animated:YES completion:nil];
}

#pragma mark 分享 暂时是携程与 特卖 公用一个
- (void)shareView
{
//    ShareViewController *shareView = [ShareViewController new];
//    UINavigationController *naviShare = [[UINavigationController alloc] initWithRootViewController:shareView];
//    [self.navigationController presentViewController:naviShare animated:YES completion:nil];
}

@end
